package com.zzy.model;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.sql.Blob;

@TableName(value = "t_blob_data")
public class BlobEntity {
    @TableId(value = "id")
    private Integer id;
    @TableField(value = "title")
    private String title;

    // 测试 读取 是 JsonObject 存    数据库是 blob
    @TableField(value = "blobJsonObjectClumn")
    private JSONObject blobJsonObjectClumn;

    //测试 读取 是 JSONObject， 数据库 是 string
    @TableField(value = "infoJson")
    private JSONObject infoJson;

  // 测试 读取 是 string 存    数据库是 blob
    @TableField(value = "blobStrClumn")
    private String blobStrClumn;

    // mybatis 对 blob 处理不友好，使用 byte[] 作为参数 存
    @TableField(value = "blobByteData")
    private byte[] blobByteData;




    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }



    public byte[] getBlobByteData() {
        return blobByteData;
    }

    public void setBlobByteData(byte[] blobByteData) {
        this.blobByteData = blobByteData;
    }

    public JSONObject getInfoJson() {
        return infoJson;
    }

    public void setInfoJson(JSONObject infoJson) {
        this.infoJson = infoJson;
    }

    public String getBlobStrClumn() {
        return blobStrClumn;
    }

    public void setBlobStrClumn(String blobStrClumn) {
        this.blobStrClumn = blobStrClumn;
    }

    public JSONObject getBlobJsonObjectClumn() {
        return blobJsonObjectClumn;
    }

    public void setBlobJsonObjectClumn(JSONObject blobJsonObjectClumn) {
        this.blobJsonObjectClumn = blobJsonObjectClumn;
    }
}
